<!--
  @author nowind
  @since 2018/10/19 08:59
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>供应商管理</title>
</head>
<!--<script src="/js/supplier/zmn.scm.supplier.lay.js"></script>-->
<body>

<div class="layui-fluid">


    <blockquote class="layui-elem-quote layui-text">
        <a lay-href="/supplier/list.action">供应商管理</a>
    </blockquote>

    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <div class="layui-split">&nbsp;</div>
                <div th:replace="supplier/_query :: query "></div>
                <div class="layui-tab-item layui-show">
                    <table class="layui-hide" id="zmn-supplier-table" lay-filter="zmn-supplier-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>


<div th:replace="part/partCommonTemplet::statusTemplet"></div>
<script type="text/html" id="zmn-supplier-table-bar">
    {{#  if(permission.hasEdit){ }}
    <div>
        <!--    <a lay-href="/supplier/detail.action?supplierId={{d.supplierId}}" lay-event="edit" class="layui-btn layui-btn-xs">编辑</a> -->
        <a lay-href="/supplier/addEdit.action?supplierId={{d.supplierId}}" lay-text="编辑供应商" class="layui-btn layui-btn-xs">编辑</a>
    </div>
    {{#}}}
</script>
<script type="text/html" id="zmn-supplier-table-tool">
    <div class="layui-btn-container">
        {{# if(permission.hasStatus){ }}
        <div class="layui-btn-group">
            <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>
            <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stop">停用</button>

        </div>
        {{#}}}
        {{# if(permission.hasEdit){ }}
        <div class="layui-btn-group">
            <a lay-href="/supplier/addEdit.action" class="layui-btn layui-btn-sm"
               lay-text="新增供应商">新增供应商</a>
        </div>
        {{#}}}
    </div>

</script>
<script type="text/javascript" th:inline="javascript">

    let permission = {
        hasEdit: [[${#authPermit.checkPermit('/supplier/addEdit.action')}]],
        hasStatus: [[${#authPermit.checkPermit('/supplier/ajax/updateStatus.action')}]],
    };

    let json = {
        platformCompanySimpleList: [[${platformCompanySimpleList}]]
    };


    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        scm_scmSupplier: "{/}/static/js/module/supplier/zmn.scm.scmsupplier.list"
    }).use(['index', 'scm_scmSupplier']);

</script>
</body>
</html>